package com.itheima.A01mapDemo;

import java.util.HashMap;
import java.util.Map;

public class A01mapDemo {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();
        map.put("张三","北京");
        map.put("李四","上海");
        map.put("王五","广州");

        String remove = map.remove("张三");
        System.out.println(remove);


        int size = map.size();
        System.out.println(size);

        //遍历集合
            for (Map.Entry<String, String> entry : map.entrySet()) {
                System.out.println(entry.getKey()+"-->"+entry.getValue());
            }
    }


}
